﻿

Public Class cLocalesGossipMenuOption
    Private _Row As SortedList(Of String, sMysqlItem)
    Private _loc As UInt32 = 3

    Public Sub New(conn As MySQL, menu_id As UInt32, id As UInt32, loc As UInt32)
        _loc = loc
        If IsNothing(conn) Then Throw New ArgumentNullException("cLocalesGossipMenuOption: conn is nothing")
        Dim sql As String = "SELECT menu_id,id,option_text_loc" & loc & ",box_text_loc" & loc & " FROM locales_gossip_menu_option WHERE menu_id=" & menu_id & " AND id=" & id & ";"
        _Row = conn.ReadRow(sql)
    End Sub
    Public Property option_text As String
        Get
            If _Row.ContainsKey("option_text_loc" & _loc) Then
                Return _Row.Item("option_text_loc" & _loc).Value
            Else
                Return ""
            End If
        End Get
        Set(value As String)
            Stop
        End Set
    End Property
    Public Property box_text As String
        Get
            If _Row.ContainsKey("box_text_loc" & _loc) Then
                Return _Row.Item("box_text_loc" & _loc).Value
            Else
                Return ""
            End If
        End Get
        Set(value As String)
            Stop
        End Set
    End Property

End Class
